<include file="Public:header" />
<div class="container">
<!-- 提供给线下派发优惠券 -->
  <div class="page-header">
    <h1>使用SN码领取优惠券<small></small></h1>
  </div>
  <form action="{:U('receive_sn')}" method="post" class="form-inline">
    <div class="form-group">
      <label class="sr-only" for="exampleInputEmail3">SN码</label>
      <input type="text" class="form-control" placeholder="Number" name="sn" >
      <input type="hidden" name="site_id" value="{$site_id}">
      <input type="hidden" name="member_id" value="{$member_id}">
    </div>
    <!-- <input type="text" name="sn" value="{$sn}"> -->
    <button type="submit" class="btn btn-success" style="width:90%; display:block; margin:0 auto;">领取</button>
  </form>

  <table class="table">
      <thead>
        <tr>
          <th>我的优惠券</th>
          <th>标题</th>
          <th>领取日期</th>
          <th>过期日期</th>
          <th>状态</th>
        </tr>
      </thead>
      <tbody>
        <volist name="myCoupons" id="sn">
          <if condition="$sn.status eq '1'">
            <tr class="success">
          <else />
            <tr class="danger">
          </if>
            <th scope="row">{$sn.id}</th>
            <td>{$sn.title}</td>
            <td>{$sn.ctime|day_format}</td>
            <td>{$sn.end_time|day_format}</td>
            <td><if condition="$sn.status eq '1'">启用<else />关闭</if></td>
          </tr>
        </volist>
      </tbody>
    </table>
</div>
<include file="Public:footer" /> 